// app/ditu/page.js
'use client';

import dynamic from 'next/dynamic';
import { useSearchParams } from 'next/navigation';

// 动态导入地图组件，禁用SSR
const MapComponent = dynamic(
  () => import('./ditu'),
  { 
    ssr: false,
    loading: () => <p>地图组件加载中...</p>
  }
);

export default function DituPage() {
  const searchParams = useSearchParams();
  const endPoint = searchParams.get('endPoint') || '';

  return (
    <div>
      
      <MapComponent initialEndPoint={endPoint} />
    </div>
  );
}
